import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class RegistrationServlet extends HttpServlet 
{
	public void doPost(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
	{
		res.setContentType("text/html");
		PrintWriter out=res.getWriter();
		String uname=req.getParameter("uname");
		String upwd=req.getParameter("upwd");
		String email=req.getParameter("email");
		String mobile=req.getParameter("mobile");
		LoginBean lb=new LoginBean();
		String status=lb.registrationDetails(uname,upwd,email,mobile);
		out.println("<html>");
		out.println("<body bgcolor='lightyellow'><center><b>");
		out.println("<font size='7' color='red'><br><br>");
		if(status.equals("success"))
		{
			out.println("Registration Success");
		}
		if(status.equals("failure"))
		{
			out.println("Registration Failure");
		}
		if(status.equals("existed"))
		{
			out.println("User Already Existed");
		}
		out.println("</font></b></center></body></html>");

	}
}
